import { get, post } from './utils/request'
import md5 from 'js-md5'
export default {
    methods: {
        $encrypt(str) {
            return md5(md5(md5(str + 'simba').split('').reverse().join('')) + 'ace')
        },
        $get(url, params) {
            return get(url, params);
        },
        $post(url, params) {
            return post(url, params);
        },
        $ms(str, onOk) {
            this.$message.success(str, 1, onOk);
        },
        $mw(str, onOk) {
            this.$message.warning(str, 1, onOk);
        },
        $me(str, onOk) {
            this.$message.error(str, 1, onOk);
        },
        $mc(content, onOk) {
            this.$confirm({
                title: "系统提示",
                content,
                onOk
            });
        }
    },
}